home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 2003 August / MW 8 2003 CD1.iso / Inside Macworld / Product News / gimp-1.2.4.sit / gimp-1.2.4 / devel-docs / libgimp / sgml / gimptools.sgml < prev    next >
Encoding:
Text File  |  2003-05-20  |  89.4 KB  |  1,660 lines

  1. <refentry id="libgimp-gimptools" revision="19 Jan 2001">
  2. <refmeta>
  3. <refentrytitle>gimptools</refentrytitle>
  4. <manvolnum>3</manvolnum>
  5. <refmiscinfo>LIBGIMP Library</refmiscinfo>
  6. </refmeta>
  7.  
  8. <refnamediv>
  9. <refname>gimptools</refname><refpurpose></refpurpose>
  10. </refnamediv>
  11.  
  12. <refsynopsisdiv><title>Synopsis</title>
  13. <synopsis>
  14.  
  15.  
  16.  
  17. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-airbrush">gimp_airbrush</link>                   (<link linkend="gint32">gint32</link> drawable_ID,
  18.                                              <link linkend="gdouble">gdouble</link> pressure,
  19.                                              <link linkend="gint">gint</link> num_strokes,
  20.                                              <link linkend="gdouble">gdouble</link> *strokes);
  21. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-airbrush-default">gimp_airbrush_default</link>           (<link linkend="gint32">gint32</link> drawable_ID,
  22.                                              <link linkend="gint">gint</link> num_strokes,
  23.                                              <link linkend="gdouble">gdouble</link> *strokes);
  24. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-blend">gimp_blend</link>                      (<link linkend="gint32">gint32</link> drawable_ID,
  25.                                              <link linkend="GimpBlendMode">GimpBlendMode</link> blend_mode,
  26.                                              <link linkend="GimpLayerModeEffects">GimpLayerModeEffects</link> paint_mode,
  27.                                              <link linkend="GimpGradientType">GimpGradientType</link> gradient_type,
  28.                                              <link linkend="gdouble">gdouble</link> opacity,
  29.                                              <link linkend="gdouble">gdouble</link> offset,
  30.                                              <link linkend="GimpRepeatMode">GimpRepeatMode</link> repeat,
  31.                                              <link linkend="gboolean">gboolean</link> supersample,
  32.                                              <link linkend="gint">gint</link> max_depth,
  33.                                              <link linkend="gdouble">gdouble</link> threshold,
  34.                                              <link linkend="gdouble">gdouble</link> x1,
  35.                                              <link linkend="gdouble">gdouble</link> y1,
  36.                                              <link linkend="gdouble">gdouble</link> x2,
  37.                                              <link linkend="gdouble">gdouble</link> y2);
  38. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-bucket-fill">gimp_bucket_fill</link>                (<link linkend="gint32">gint32</link> drawable_ID,
  39.                                              <link linkend="GimpBucketFillMode">GimpBucketFillMode</link> fill_mode,
  40.                                              <link linkend="GimpLayerModeEffects">GimpLayerModeEffects</link> paint_mode,
  41.                                              <link linkend="gdouble">gdouble</link> opacity,
  42.                                              <link linkend="gdouble">gdouble</link> threshold,
  43.                                              <link linkend="gboolean">gboolean</link> sample_merged,
  44.                                              <link linkend="gdouble">gdouble</link> x,
  45.                                              <link linkend="gdouble">gdouble</link> y);
  46. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-by-color-select">gimp_by_color_select</link>            (<link linkend="gint32">gint32</link> drawable_ID,
  47.                                              <link linkend="guchar">guchar</link> red,
  48.                                              <link linkend="guchar">guchar</link> green,
  49.                                              <link linkend="guchar">guchar</link> blue,
  50.                                              <link linkend="gint">gint</link> threshold,
  51.                                              <link linkend="GimpChannelOps">GimpChannelOps</link> operation,
  52.                                              <link linkend="gboolean">gboolean</link> antialias,
  53.                                              <link linkend="gboolean">gboolean</link> feather,
  54.                                              <link linkend="gdouble">gdouble</link> feather_radius,
  55.                                              <link linkend="gboolean">gboolean</link> sample_merged);
  56. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-clone">gimp_clone</link>                      (<link linkend="gint32">gint32</link> drawable_ID,
  57.                                              <link linkend="gint32">gint32</link> src_drawable_ID,
  58.                                              <link linkend="GimpCloneType">GimpCloneType</link> clone_type,
  59.                                              <link linkend="gdouble">gdouble</link> src_x,
  60.                                              <link linkend="gdouble">gdouble</link> src_y,
  61.                                              <link linkend="gint">gint</link> num_strokes,
  62.                                              <link linkend="gdouble">gdouble</link> *strokes);
  63. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-clone-default">gimp_clone_default</link>              (<link linkend="gint32">gint32</link> drawable_ID,
  64.                                              <link linkend="gint">gint</link> num_strokes,
  65.                                              <link linkend="gdouble">gdouble</link> *strokes);
  66. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-color-picker">gimp_color_picker</link>               (<link linkend="gint32">gint32</link> image_ID,
  67.                                              <link linkend="gint32">gint32</link> drawable_ID,
  68.                                              <link linkend="gdouble">gdouble</link> x,
  69.                                              <link linkend="gdouble">gdouble</link> y,
  70.                                              <link linkend="gboolean">gboolean</link> sample_merged,
  71.                                              <link linkend="gboolean">gboolean</link> sample_average,
  72.                                              <link linkend="gdouble">gdouble</link> average_radius,
  73.                                              <link linkend="gboolean">gboolean</link> save_color,
  74.                                              <link linkend="guchar">guchar</link> *red,
  75.                                              <link linkend="guchar">guchar</link> *green,
  76.                                              <link linkend="guchar">guchar</link> *blue);
  77. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-convolve">gimp_convolve</link>                   (<link linkend="gint32">gint32</link> drawable_ID,
  78.                                              <link linkend="gdouble">gdouble</link> pressure,
  79.                                              <link linkend="GimpConvolveType">GimpConvolveType</link> convolve_type,
  80.                                              <link linkend="gint">gint</link> num_strokes,
  81.                                              <link linkend="gdouble">gdouble</link> *strokes);
  82. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-convolve-default">gimp_convolve_default</link>           (<link linkend="gint32">gint32</link> drawable_ID,
  83.                                              <link linkend="gint">gint</link> num_strokes,
  84.                                              <link linkend="gdouble">gdouble</link> *strokes);
  85. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-crop">gimp_crop</link>                       (<link linkend="gint32">gint32</link> image_ID,
  86.                                              <link linkend="gint">gint</link> new_width,
  87.                                              <link linkend="gint">gint</link> new_height,
  88.                                              <link linkend="gint">gint</link> offx,
  89.                                              <link linkend="gint">gint</link> offy);
  90. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-dodgeburn">gimp_dodgeburn</link>                  (<link linkend="gint32">gint32</link> drawable_ID,
  91.                                              <link linkend="gdouble">gdouble</link> exposure,
  92.                                              <link linkend="GimpDodgeBurnType">GimpDodgeBurnType</link> dodgeburn_type,
  93.                                              <link linkend="GimpDodgeBurnMode">GimpDodgeBurnMode</link> dodgeburn_mode,
  94.                                              <link linkend="gint">gint</link> num_strokes,
  95.                                              <link linkend="gdouble">gdouble</link> *strokes);
  96. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-dodgeburn-default">gimp_dodgeburn_default</link>          (<link linkend="gint32">gint32</link> drawable_ID,
  97.                                              <link linkend="gint">gint</link> num_strokes,
  98.                                              <link linkend="gdouble">gdouble</link> *strokes);
  99. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-ellipse-select">gimp_ellipse_select</link>             (<link linkend="gint32">gint32</link> image_ID,
  100.                                              <link linkend="gdouble">gdouble</link> x,
  101.                                              <link linkend="gdouble">gdouble</link> y,
  102.                                              <link linkend="gdouble">gdouble</link> width,
  103.                                              <link linkend="gdouble">gdouble</link> height,
  104.                                              <link linkend="GimpChannelOps">GimpChannelOps</link> operation,
  105.                                              <link linkend="gboolean">gboolean</link> antialias,
  106.                                              <link linkend="gboolean">gboolean</link> feather,
  107.                                              <link linkend="gdouble">gdouble</link> feather_radius);
  108. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-eraser">gimp_eraser</link>                     (<link linkend="gint32">gint32</link> drawable_ID,
  109.                                              <link linkend="gint">gint</link> num_strokes,
  110.                                              <link linkend="gdouble">gdouble</link> *strokes,
  111.                                              <link linkend="GimpBrushApplicationMode">GimpBrushApplicationMode</link> hardness,
  112.                                              <link linkend="GimpPaintApplicationMode">GimpPaintApplicationMode</link> method);
  113. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-eraser-default">gimp_eraser_default</link>             (<link linkend="gint32">gint32</link> drawable_ID,
  114.                                              <link linkend="gint">gint</link> num_strokes,
  115.                                              <link linkend="gdouble">gdouble</link> *strokes);
  116. <link linkend="gint32">gint32</link>      <link linkend="gimp-flip">gimp_flip</link>                       (<link linkend="gint32">gint32</link> drawable_ID,
  117.                                              <link linkend="GimpOrientationType">GimpOrientationType</link> flip_type);
  118. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-free-select">gimp_free_select</link>                (<link linkend="gint32">gint32</link> image_ID,
  119.                                              <link linkend="gint">gint</link> num_segs,
  120.                                              <link linkend="gdouble">gdouble</link> *segs,
  121.                                              <link linkend="GimpChannelOps">GimpChannelOps</link> operation,
  122.                                              <link linkend="gboolean">gboolean</link> antialias,
  123.                                              <link linkend="gboolean">gboolean</link> feather,
  124.                                              <link linkend="gdouble">gdouble</link> feather_radius);
  125. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-fuzzy-select">gimp_fuzzy_select</link>               (<link linkend="gint32">gint32</link> drawable_ID,
  126.                                              <link linkend="gdouble">gdouble</link> x,
  127.                                              <link linkend="gdouble">gdouble</link> y,
  128.                                              <link linkend="gint">gint</link> threshold,
  129.                                              <link linkend="GimpChannelOps">GimpChannelOps</link> operation,
  130.                                              <link linkend="gboolean">gboolean</link> antialias,
  131.                                              <link linkend="gboolean">gboolean</link> feather,
  132.                                              <link linkend="gdouble">gdouble</link> feather_radius,
  133.                                              <link linkend="gboolean">gboolean</link> sample_merged);
  134. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-paintbrush">gimp_paintbrush</link>                 (<link linkend="gint32">gint32</link> drawable_ID,
  135.                                              <link linkend="gdouble">gdouble</link> fade_out,
  136.                                              <link linkend="gint">gint</link> num_strokes,
  137.                                              <link linkend="gdouble">gdouble</link> *strokes,
  138.                                              <link linkend="GimpPaintApplicationMode">GimpPaintApplicationMode</link> method,
  139.                                              <link linkend="gdouble">gdouble</link> gradient_length);
  140. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-paintbrush-default">gimp_paintbrush_default</link>         (<link linkend="gint32">gint32</link> drawable_ID,
  141.                                              <link linkend="gint">gint</link> num_strokes,
  142.                                              <link linkend="gdouble">gdouble</link> *strokes);
  143. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-pencil">gimp_pencil</link>                     (<link linkend="gint32">gint32</link> drawable_ID,
  144.                                              <link linkend="gint">gint</link> num_strokes,
  145.                                              <link linkend="gdouble">gdouble</link> *strokes);
  146. <link linkend="gint32">gint32</link>      <link linkend="gimp-perspective">gimp_perspective</link>                (<link linkend="gint32">gint32</link> drawable_ID,
  147.                                              <link linkend="gboolean">gboolean</link> interpolation,
  148.                                              <link linkend="gdouble">gdouble</link> x0,
  149.                                              <link linkend="gdouble">gdouble</link> y0,
  150.                                              <link linkend="gdouble">gdouble</link> x1,
  151.                                              <link linkend="gdouble">gdouble</link> y1,
  152.                                              <link linkend="gdouble">gdouble</link> x2,
  153.                                              <link linkend="gdouble">gdouble</link> y2,
  154.                                              <link linkend="gdouble">gdouble</link> x3,
  155.                                              <link linkend="gdouble">gdouble</link> y3);
  156. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-rect-select">gimp_rect_select</link>                (<link linkend="gint32">gint32</link> image_ID,
  157.                                              <link linkend="gdouble">gdouble</link> x,
  158.                                              <link linkend="gdouble">gdouble</link> y,
  159.                                              <link linkend="gdouble">gdouble</link> width,
  160.                                              <link linkend="gdouble">gdouble</link> height,
  161.                                              <link linkend="GimpChannelOps">GimpChannelOps</link> operation,
  162.                                              <link linkend="gboolean">gboolean</link> feather,
  163.                                              <link linkend="gdouble">gdouble</link> feather_radius);
  164. <link linkend="gint32">gint32</link>      <link linkend="gimp-rotate">gimp_rotate</link>                     (<link linkend="gint32">gint32</link> drawable_ID,
  165.                                              <link linkend="gboolean">gboolean</link> interpolation,
  166.                                              <link linkend="gdouble">gdouble</link> angle);
  167. <link linkend="gint32">gint32</link>      <link linkend="gimp-scale">gimp_scale</link>                      (<link linkend="gint32">gint32</link> drawable_ID,
  168.                                              <link linkend="gboolean">gboolean</link> interpolation,
  169.                                              <link linkend="gdouble">gdouble</link> x0,
  170.                                              <link linkend="gdouble">gdouble</link> y0,
  171.                                              <link linkend="gdouble">gdouble</link> x1,
  172.                                              <link linkend="gdouble">gdouble</link> y1);
  173. <link linkend="gint32">gint32</link>      <link linkend="gimp-shear">gimp_shear</link>                      (<link linkend="gint32">gint32</link> drawable_ID,
  174.                                              <link linkend="gboolean">gboolean</link> interpolation,
  175.                                              <link linkend="GimpOrientationType">GimpOrientationType</link> shear_type,
  176.                                              <link linkend="gdouble">gdouble</link> magnitude);
  177. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-smudge">gimp_smudge</link>                     (<link linkend="gint32">gint32</link> drawable_ID,
  178.                                              <link linkend="gdouble">gdouble</link> pressure,
  179.                                              <link linkend="gint">gint</link> num_strokes,
  180.                                              <link linkend="gdouble">gdouble</link> *strokes);
  181. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-smudge-default">gimp_smudge_default</link>             (<link linkend="gint32">gint32</link> drawable_ID,
  182.                                              <link linkend="gint">gint</link> num_strokes,
  183.                                              <link linkend="gdouble">gdouble</link> *strokes);
  184. <link linkend="gint32">gint32</link>      <link linkend="gimp-transform-2d">gimp_transform_2d</link>               (<link linkend="gint32">gint32</link> drawable_ID,
  185.                                              <link linkend="gboolean">gboolean</link> interpolation,
  186.                                              <link linkend="gdouble">gdouble</link> source_x,
  187.                                              <link linkend="gdouble">gdouble</link> source_y,
  188.                                              <link linkend="gdouble">gdouble</link> scale_x,
  189.                                              <link linkend="gdouble">gdouble</link> scale_y,
  190.                                              <link linkend="gdouble">gdouble</link> angle,
  191.                                              <link linkend="gdouble">gdouble</link> dest_x,
  192.                                              <link linkend="gdouble">gdouble</link> dest_y);
  193. </synopsis>
  194. </refsynopsisdiv>
  195.  
  196.  
  197.  
  198.  
  199.  
  200. <refsect1>
  201. <title>Description</title>
  202. <para>
  203.  
  204. </para>
  205. </refsect1>
  206.  
  207. <refsect1>
  208. <title>Details</title>
  209. <refsect2>
  210. <title><anchor id="gimp-airbrush">gimp_airbrush ()</title>
  211. <programlisting><link linkend="gboolean">gboolean</link>    gimp_airbrush                   (<link linkend="gint32">gint32</link> drawable_ID,
  212.                                              <link linkend="gdouble">gdouble</link> pressure,
  213.                                              <link linkend="gint">gint</link> num_strokes,
  214.                                              <link linkend="gdouble">gdouble</link> *strokes);</programlisting>
  215. <para>
  216. Paint in the current brush with varying pressure. Paint application
  217. is time-dependent.
  218. </para>
  219. <para>
  220. This tool simulates the use of an airbrush. Paint pressure
  221. represents the relative intensity of the paint application. High
  222. pressure results in a thicker layer of paint while low pressure
  223. results in a thinner layer.</para>
  224. <para>
  225.  
  226. </para><informaltable pgwide=1 frame="none" role="params">
  227. <tgroup cols="2">
  228. <colspec colwidth="2*">
  229. <colspec colwidth="8*">
  230. <tbody>
  231. <row><entry align="right"><parameter>drawable_ID</parameter> :</entry>
  232. <entry> The affected drawable.
  233. </entry></row>
  234. <row><entry align="right"><parameter>pressure</parameter> :</entry>
  235. <entry> The pressure of the airbrush strokes.
  236. </entry></row>
  237. <row><entry align="right"><parameter>num_strokes</parameter> :</entry>
  238. <entry> Number of stroke control points (count each coordinate as 2 points).
  239. </entry></row>
  240. <row><entry align="right"><parameter>strokes</parameter> :</entry>
  241. <entry> Array of stroke coordinates: { s1.x, s1.y, s2.x, s2.y, ..., sn.x, sn.y }.
  242. </entry></row>
  243. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE on success.
  244. </entry></row>
  245. </tbody></tgroup></informaltable></refsect2>
  246. <refsect2>
  247. <title><anchor id="gimp-airbrush-default">gimp_airbrush_default ()</title>
  248. <programlisting><link linkend="gboolean">gboolean</link>    gimp_airbrush_default           (<link linkend="gint32">gint32</link> drawable_ID,
  249.                                              <link linkend="gint">gint</link> num_strokes,
  250.                                              <link linkend="gdouble">gdouble</link> *strokes);</programlisting>
  251. <para>
  252. Paint in the current brush with varying pressure. Paint application
  253. is time-dependent.
  254. </para>
  255. <para>
  256. This tool simulates the use of an airbrush. It is similar to
  257. gimp_airbrush except that the pressure is derived from the airbrush
  258. tools options box. It the option has not been set the default for
  259. the option will be used.</para>
  260. <para>
  261.  
  262. </para><informaltable pgwide=1 frame="none" role="params">
  263. <tgroup cols="2">
  264. <colspec colwidth="2*">
  265. <colspec colwidth="8*">
  266. <tbody>
  267. <row><entry align="right"><parameter>drawable_ID</parameter> :</entry>
  268. <entry> The affected drawable.
  269. </entry></row>
  270. <row><entry align="right"><parameter>num_strokes</parameter> :</entry>
  271. <entry> Number of stroke control points (count each coordinate as 2 points).
  272. </entry></row>
  273. <row><entry align="right"><parameter>strokes</parameter> :</entry>
  274. <entry> Array of stroke coordinates: { s1.x, s1.y, s2.x, s2.y, ..., sn.x, sn.y }.
  275. </entry></row>
  276. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE on success.
  277. </entry></row>
  278. </tbody></tgroup></informaltable></refsect2>
  279. <refsect2>
  280. <title><anchor id="gimp-blend">gimp_blend ()</title>
  281. <programlisting><link linkend="gboolean">gboolean</link>    gimp_blend                      (<link linkend="gint32">gint32</link> drawable_ID,
  282.                                              <link linkend="GimpBlendMode">GimpBlendMode</link> blend_mode,
  283.                                              <link linkend="GimpLayerModeEffects">GimpLayerModeEffects</link> paint_mode,
  284.                                              <link linkend="GimpGradientType">GimpGradientType</link> gradient_type,
  285.                                              <link linkend="gdouble">gdouble</link> opacity,
  286.                                              <link linkend="gdouble">gdouble</link> offset,
  287.                                              <link linkend="GimpRepeatMode">GimpRepeatMode</link> repeat,
  288.                                              <link linkend="gboolean">gboolean</link> supersample,
  289.                                              <link linkend="gint">gint</link> max_depth,
  290.                                              <link linkend="gdouble">gdouble</link> threshold,
  291.                                              <link linkend="gdouble">gdouble</link> x1,
  292.                                              <link linkend="gdouble">gdouble</link> y1,
  293.                                              <link linkend="gdouble">gdouble</link> x2,
  294.                                              <link linkend="gdouble">gdouble</link> y2);</programlisting>
  295. <para>
  296. Blend between the starting and ending coordinates with the specified
  297. blend mode and gradient type.
  298. </para>
  299. <para>
  300. This tool requires information on the paint application mode, the
  301. blend mode, and the gradient type. It creates the specified variety
  302. of blend using the starting and ending coordinates as defined for
  303. each gradient type.</para>
  304. <para>
  305.  
  306. </para><informaltable pgwide=1 frame="none" role="params">
  307. <tgroup cols="2">
  308. <colspec colwidth="2*">
  309. <colspec colwidth="8*">
  310. <tbody>
  311. <row><entry align="right"><parameter>drawable_ID</parameter> :</entry>
  312. <entry> The affected drawable.
  313. </entry></row>
  314. <row><entry align="right"><parameter>blend_mode</parameter> :</entry>
  315. <entry> The type of blend.
  316. </entry></row>
  317. <row><entry align="right"><parameter>paint_mode</parameter> :</entry>
  318. <entry> The paint application mode.
  319. </entry></row>
  320. <row><entry align="right"><parameter>gradient_type</parameter> :</entry>
  321. <entry> The type of gradient.
  322. </entry></row>
  323. <row><entry align="right"><parameter>opacity</parameter> :</entry>
  324. <entry> The opacity of the final blend.
  325. </entry></row>
  326. <row><entry align="right"><parameter>offset</parameter> :</entry>
  327. <entry> Offset relates to the starting and ending coordinates specified for the blend. This parameter is mode dependent.
  328. </entry></row>
  329. <row><entry align="right"><parameter>repeat</parameter> :</entry>
  330. <entry> Repeat mode.
  331. </entry></row>
  332. <row><entry align="right"><parameter>supersample</parameter> :</entry>
  333. <entry> Do adaptive supersampling.
  334. </entry></row>
  335. <row><entry align="right"><parameter>max_depth</parameter> :</entry>
  336. <entry> Maximum recursion levels for supersampling.
  337. </entry></row>
  338. <row><entry align="right"><parameter>threshold</parameter> :</entry>
  339. <entry> Supersampling threshold.
  340. </entry></row>
  341. <row><entry align="right"><parameter>x1</parameter> :</entry>
  342. <entry> The x coordinate of this blend's starting point.
  343. </entry></row>
  344. <row><entry align="right"><parameter>y1</parameter> :</entry>
  345. <entry> The y coordinate of this blend's starting point.
  346. </entry></row>
  347. <row><entry align="right"><parameter>x2</parameter> :</entry>
  348. <entry> The x coordinate of this blend's ending point.
  349. </entry></row>
  350. <row><entry align="right"><parameter>y2</parameter> :</entry>
  351. <entry> The y coordinate of this blend's ending point.
  352. </entry></row>
  353. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE on success.
  354. </entry></row>
  355. </tbody></tgroup></informaltable></refsect2>
  356. <refsect2>
  357. <title><anchor id="gimp-bucket-fill">gimp_bucket_fill ()</title>
  358. <programlisting><link linkend="gboolean">gboolean</link>    gimp_bucket_fill                (<link linkend="gint32">gint32</link> drawable_ID,
  359.                                              <link linkend="GimpBucketFillMode">GimpBucketFillMode</link> fill_mode,
  360.                                              <link linkend="GimpLayerModeEffects">GimpLayerModeEffects</link> paint_mode,
  361.                                              <link linkend="gdouble">gdouble</link> opacity,
  362.                                              <link linkend="gdouble">gdouble</link> threshold,
  363.                                              <link linkend="gboolean">gboolean</link> sample_merged,
  364.                                              <link linkend="gdouble">gdouble</link> x,
  365.                                              <link linkend="gdouble">gdouble</link> y);</programlisting>
  366. <para>
  367. Fill the area specified either by the current selection if there is
  368. one, or by a seed fill starting at the specified coordinates.
  369. </para>
  370. <para>
  371. This tool requires information on the paint application mode, and
  372. the fill mode, which can either be in the foreground color, or in
  373. the currently active pattern. If there is no selection, a seed fill
  374. is executed at the specified coordinates and extends outward in
  375. keeping with the threshold parameter. If there is a selection in the
  376. target image, the threshold, sample merged, x, and y arguments are
  377. unused. If the sample_merged parameter is non-zero, the data of the
  378. composite image will be used instead of that for the specified
  379. drawable. This is equivalent to sampling for colors after merging
  380. all visible layers. In the case of merged sampling, the x,y
  381. coordinates are relative to the image's origin; otherwise, they are
  382. relative to the drawable's origin.</para>
  383. <para>
  384.  
  385. </para><informaltable pgwide=1 frame="none" role="params">
  386. <tgroup cols="2">
  387. <colspec colwidth="2*">
  388. <colspec colwidth="8*">
  389. <tbody>
  390. <row><entry align="right"><parameter>drawable_ID</parameter> :</entry>
  391. <entry> The affected drawable.
  392. </entry></row>
  393. <row><entry align="right"><parameter>fill_mode</parameter> :</entry>
  394. <entry> The type of fill.
  395. </entry></row>
  396. <row><entry align="right"><parameter>paint_mode</parameter> :</entry>
  397. <entry> The paint application mode.
  398. </entry></row>
  399. <row><entry align="right"><parameter>opacity</parameter> :</entry>
  400. <entry> The opacity of the final bucket fill.
  401. </entry></row>
  402. <row><entry align="right"><parameter>threshold</parameter> :</entry>
  403. <entry> The threshold determines how extensive the seed fill will be. It's value is specified in terms of intensity levels . This parameter is only valid when there is no selection in the specified image.
  404. </entry></row>
  405. <row><entry align="right"><parameter>sample_merged</parameter> :</entry>
  406. <entry> Use the composite image, not the drawable.
  407. </entry></row>
  408. <row><entry align="right"><parameter>x</parameter> :</entry>
  409. <entry> The x coordinate of this bucket fill's application. This parameter is only valid when there is no selection in the specified image.
  410. </entry></row>
  411. <row><entry align="right"><parameter>y</parameter> :</entry>
  412. <entry> The y coordinate of this bucket fill's application. This parameter is only valid when there is no selection in the specified image.
  413. </entry></row>
  414. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE on success.
  415. </entry></row>
  416. </tbody></tgroup></informaltable></refsect2>
  417. <refsect2>
  418. <title><anchor id="gimp-by-color-select">gimp_by_color_select ()</title>
  419. <programlisting><link linkend="gboolean">gboolean</link>    gimp_by_color_select            (<link linkend="gint32">gint32</link> drawable_ID,
  420.                                              <link linkend="guchar">guchar</link> red,
  421.                                              <link linkend="guchar">guchar</link> green,
  422.                                              <link linkend="guchar">guchar</link> blue,
  423.                                              <link linkend="gint">gint</link> threshold,
  424.                                              <link linkend="GimpChannelOps">GimpChannelOps</link> operation,
  425.                                              <link linkend="gboolean">gboolean</link> antialias,
  426.                                              <link linkend="gboolean">gboolean</link> feather,
  427.                                              <link linkend="gdouble">gdouble</link> feather_radius,
  428.                                              <link linkend="gboolean">gboolean</link> sample_merged);</programlisting>
  429. <para>
  430. Create a selection by selecting all pixels (in the specified
  431. drawable) with the same (or similar) color to that specified.
  432. </para>
  433. <para>
  434. This tool creates a selection over the specified image. A by-color
  435. selection is determined by the supplied color under the constraints
  436. of the specified threshold. Essentially, all pixels (in the
  437. drawable) that have color sufficiently close to the specified color
  438. (as determined by the threshold value) are included in the
  439. selection. The antialiasing parameter allows the final selection
  440. mask to contain intermediate values based on close misses to the
  441. threshold bar. Feathering can be enabled optionally and is
  442. controlled with the \"feather_radius\" parameter. If the
  443. sample_merged parameter is non-zero, the data of the composite image
  444. will be used instead of that for the specified drawable. This is
  445. equivalent to sampling for colors after merging all visible layers.
  446. In the case of a merged sampling, the supplied drawable is ignored.</para>
  447. <para>
  448.  
  449. </para><informaltable pgwide=1 frame="none" role="params">
  450. <tgroup cols="2">
  451. <colspec colwidth="2*">
  452. <colspec colwidth="8*">
  453. <tbody>
  454. <row><entry align="right"><parameter>drawable_ID</parameter> :</entry>
  455. <entry> The affected drawable.
  456. </entry></row>
  457. <row><entry align="right"><parameter>red</parameter> :</entry>
  458. <entry>
  459. </entry></row>
  460. <row><entry align="right"><parameter>green</parameter> :</entry>
  461. <entry>
  462. </entry></row>
  463. <row><entry align="right"><parameter>blue</parameter> :</entry>
  464. <entry> The color to select.
  465. </entry></row>
  466. <row><entry align="right"><parameter>threshold</parameter> :</entry>
  467. <entry> Threshold in intensity levels %<literal>desc</literal>%%.
  468. </entry></row>
  469. <row><entry align="right"><parameter>operation</parameter> :</entry>
  470. <entry> The selection operation.
  471. </entry></row>
  472. <row><entry align="right"><parameter>antialias</parameter> :</entry>
  473. <entry> Antialiasing.
  474. </entry></row>
  475. <row><entry align="right"><parameter>feather</parameter> :</entry>
  476. <entry> Feather option for selections.
  477. </entry></row>
  478. <row><entry align="right"><parameter>feather_radius</parameter> :</entry>
  479. <entry> Radius for feather operation.
  480. </entry></row>
  481. <row><entry align="right"><parameter>sample_merged</parameter> :</entry>
  482. <entry> Use the composite image, not the drawable.
  483. </entry></row>
  484. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE on success.
  485. </entry></row>
  486. </tbody></tgroup></informaltable></refsect2>
  487. <refsect2>
  488. <title><anchor id="gimp-clone">gimp_clone ()</title>
  489. <programlisting><link linkend="gboolean">gboolean</link>    gimp_clone                      (<link linkend="gint32">gint32</link> drawable_ID,
  490.                                              <link linkend="gint32">gint32</link> src_drawable_ID,
  491.                                              <link linkend="GimpCloneType">GimpCloneType</link> clone_type,
  492.                                              <link linkend="gdouble">gdouble</link> src_x,
  493.                                              <link linkend="gdouble">gdouble</link> src_y,
  494.                                              <link linkend="gint">gint</link> num_strokes,
  495.                                              <link linkend="gdouble">gdouble</link> *strokes);</programlisting>
  496. <para>
  497. Clone from the source to the dest drawable using the current brush
  498. </para>
  499. <para>
  500. This tool clones (copies) from the source drawable starting at the
  501. specified source coordinates to the dest drawable. If the
  502. \"clone_type\" argument is set to PATTERN-CLONE, then the current
  503. pattern is used as the source and the \"src_drawable\" argument is
  504. ignored. Pattern cloning assumes a tileable pattern and mods the sum
  505. of the src coordinates and subsequent stroke offsets with the width
  506. and height of the pattern. For image cloning, if the sum of the src
  507. coordinates and subsequent stroke offsets exceeds the extents of the
  508. src drawable, then no paint is transferred. The clone tool is
  509. capable of transforming between any image types including
  510. RGB->Indexed--although converting from any type to indexed is
  511. significantly slower.</para>
  512. <para>
  513.  
  514. </para><informaltable pgwide=1 frame="none" role="params">
  515. <tgroup cols="2">
  516. <colspec colwidth="2*">
  517. <colspec colwidth="8*">
  518. <tbody>
  519. <row><entry align="right"><parameter>drawable_ID</parameter> :</entry>
  520. <entry> The affected drawable.
  521. </entry></row>
  522. <row><entry align="right"><parameter>src_drawable_ID</parameter> :</entry>
  523. <entry> The source drawable.
  524. </entry></row>
  525. <row><entry align="right"><parameter>clone_type</parameter> :</entry>
  526. <entry> The type of clone.
  527. </entry></row>
  528. <row><entry align="right"><parameter>src_x</parameter> :</entry>
  529. <entry> The x coordinate in the source image.
  530. </entry></row>
  531. <row><entry align="right"><parameter>src_y</parameter> :</entry>
  532. <entry> The y coordinate in the source image.
  533. </entry></row>
  534. <row><entry align="right"><parameter>num_strokes</parameter> :</entry>
  535. <entry> Number of stroke control points (count each coordinate as 2 points).
  536. </entry></row>
  537. <row><entry align="right"><parameter>strokes</parameter> :</entry>
  538. <entry> Array of stroke coordinates: { s1.x, s1.y, s2.x, s2.y, ..., sn.x, sn.y }.
  539. </entry></row>
  540. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE on success.
  541. </entry></row>
  542. </tbody></tgroup></informaltable></refsect2>
  543. <refsect2>
  544. <title><anchor id="gimp-clone-default">gimp_clone_default ()</title>
  545. <programlisting><link linkend="gboolean">gboolean</link>    gimp_clone_default              (<link linkend="gint32">gint32</link> drawable_ID,
  546.                                              <link linkend="gint">gint</link> num_strokes,
  547.                                              <link linkend="gdouble">gdouble</link> *strokes);</programlisting>
  548. <para>
  549. Clone from the source to the dest drawable using the current brush
  550. </para>
  551. <para>
  552. This tool clones (copies) from the source drawable starting at the
  553. specified source coordinates to the dest drawable. This function
  554. performs exactly the same as the gimp_clone function except that the
  555. tools arguments are obtained from the clones option dialog. It this
  556. dialog has not been activated then the dialogs default values will
  557. be used.</para>
  558. <para>
  559.  
  560. </para><informaltable pgwide=1 frame="none" role="params">
  561. <tgroup cols="2">
  562. <colspec colwidth="2*">
  563. <colspec colwidth="8*">
  564. <tbody>
  565. <row><entry align="right"><parameter>drawable_ID</parameter> :</entry>
  566. <entry> The affected drawable.
  567. </entry></row>
  568. <row><entry align="right"><parameter>num_strokes</parameter> :</entry>
  569. <entry> Number of stroke control points (count each coordinate as 2 points).
  570. </entry></row>
  571. <row><entry align="right"><parameter>strokes</parameter> :</entry>
  572. <entry> Array of stroke coordinates: { s1.x, s1.y, s2.x, s2.y, ..., sn.x, sn.y }.
  573. </entry></row>
  574. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE on success.
  575. </entry></row>
  576. </tbody></tgroup></informaltable></refsect2>
  577. <refsect2>
  578. <title><anchor id="gimp-color-picker">gimp_color_picker ()</title>
  579. <programlisting><link linkend="gboolean">gboolean</link>    gimp_color_picker               (<link linkend="gint32">gint32</link> image_ID,
  580.                                              <link linkend="gint32">gint32</link> drawable_ID,
  581.                                              <link linkend="gdouble">gdouble</link> x,
  582.                                              <link linkend="gdouble">gdouble</link> y,
  583.                                              <link linkend="gboolean">gboolean</link> sample_merged,
  584.                                              <link linkend="gboolean">gboolean</link> sample_average,
  585.                                              <link linkend="gdouble">gdouble</link> average_radius,
  586.                                              <link linkend="gboolean">gboolean</link> save_color,
  587.                                              <link linkend="guchar">guchar</link> *red,
  588.                                              <link linkend="guchar">guchar</link> *green,
  589.                                              <link linkend="guchar">guchar</link> *blue);</programlisting>
  590. <para>
  591. Determine the color at the given drawable coordinates
  592. </para>
  593. <para>
  594. This tool determines the color at the specified coordinates. The
  595. returned color is an RGB triplet even for grayscale and indexed
  596. drawables. If the coordinates lie outside of the extents of the
  597. specified drawable, then an error is returned. If the drawable has
  598. an alpha channel, the algorithm examines the alpha value of the
  599. drawable at the coordinates. If the alpha value is completely
  600. transparent (0), then an error is returned. If the sample_merged
  601. parameter is non-zero, the data of the composite image will be used
  602. instead of that for the specified drawable. This is equivalent to
  603. sampling for colors after merging all visible layers. In the case of
  604. a merged sampling, the supplied drawable is ignored.</para>
  605. <para>
  606.  
  607. </para><informaltable pgwide=1 frame="none" role="params">
  608. <tgroup cols="2">
  609. <colspec colwidth="2*">
  610. <colspec colwidth="8*">
  611. <tbody>
  612. <row><entry align="right"><parameter>image_ID</parameter> :</entry>
  613. <entry> The image.
  614. </entry></row>
  615. <row><entry align="right"><parameter>drawable_ID</parameter> :</entry>
  616. <entry> The affected drawable.
  617. </entry></row>
  618. <row><entry align="right"><parameter>x</parameter> :</entry>
  619. <entry> x coordinate of upper-left corner of rectangle.
  620. </entry></row>
  621. <row><entry align="right"><parameter>y</parameter> :</entry>
  622. <entry> y coordinate of upper-left corner of rectangle.
  623. </entry></row>
  624. <row><entry align="right"><parameter>sample_merged</parameter> :</entry>
  625. <entry> Use the composite image, not the drawable.
  626. </entry></row>
  627. <row><entry align="right"><parameter>sample_average</parameter> :</entry>
  628. <entry> Average the color of all the pixels in a specified radius.
  629. </entry></row>
  630. <row><entry align="right"><parameter>average_radius</parameter> :</entry>
  631. <entry> The radius of pixels to average.
  632. </entry></row>
  633. <row><entry align="right"><parameter>save_color</parameter> :</entry>
  634. <entry> Save the color to the active palette.
  635. </entry></row>
  636. <row><entry align="right"><parameter>red</parameter> :</entry>
  637. <entry>
  638. </entry></row>
  639. <row><entry align="right"><parameter>green</parameter> :</entry>
  640. <entry>
  641. </entry></row>
  642. <row><entry align="right"><parameter>blue</parameter> :</entry>
  643. <entry> The return color.
  644. </entry></row>
  645. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE on success.
  646. </entry></row>
  647. </tbody></tgroup></informaltable></refsect2>
  648. <refsect2>
  649. <title><anchor id="gimp-convolve">gimp_convolve ()</title>
  650. <programlisting><link linkend="gboolean">gboolean</link>    gimp_convolve                   (<link linkend="gint32">gint32</link> drawable_ID,
  651.                                              <link linkend="gdouble">gdouble</link> pressure,
  652.                                              <link linkend="GimpConvolveType">GimpConvolveType</link> convolve_type,
  653.                                              <link linkend="gint">gint</link> num_strokes,
  654.                                              <link linkend="gdouble">gdouble</link> *strokes);</programlisting>
  655. <para>
  656. Convolve (Blur, Sharpen) using the current brush.
  657. </para>
  658. <para>
  659. This tool convolves the specified drawable with either a sharpening
  660. or blurring kernel. The pressure parameter controls the magnitude of
  661. the operation. Like the paintbrush, this tool linearly interpolates
  662. between the specified stroke coordinates.</para>
  663. <para>
  664.  
  665. </para><informaltable pgwide=1 frame="none" role="params">
  666. <tgroup cols="2">
  667. <colspec colwidth="2*">
  668. <colspec colwidth="8*">
  669. <tbody>
  670. <row><entry align="right"><parameter>drawable_ID</parameter> :</entry>
  671. <entry> The affected drawable.
  672. </entry></row>
  673. <row><entry align="right"><parameter>pressure</parameter> :</entry>
  674. <entry> The pressure.
  675. </entry></row>
  676. <row><entry align="right"><parameter>convolve_type</parameter> :</entry>
  677. <entry> Convolve type.
  678. </entry></row>
  679. <row><entry align="right"><parameter>num_strokes</parameter> :</entry>
  680. <entry> Number of stroke control points (count each coordinate as 2 points).
  681. </entry></row>
  682. <row><entry align="right"><parameter>strokes</parameter> :</entry>
  683. <entry> Array of stroke coordinates: { s1.x, s1.y, s2.x, s2.y, ..., sn.x, sn.y }.
  684. </entry></row>
  685. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE on success.
  686. </entry></row>
  687. </tbody></tgroup></informaltable></refsect2>
  688. <refsect2>
  689. <title><anchor id="gimp-convolve-default">gimp_convolve_default ()</title>
  690. <programlisting><link linkend="gboolean">gboolean</link>    gimp_convolve_default           (<link linkend="gint32">gint32</link> drawable_ID,
  691.                                              <link linkend="gint">gint</link> num_strokes,
  692.                                              <link linkend="gdouble">gdouble</link> *strokes);</programlisting>
  693. <para>
  694. Convolve (Blur, Sharpen) using the current brush.
  695. </para>
  696. <para>
  697. This tool convolves the specified drawable with either a sharpening
  698. or blurring kernel. This function performs exactly the same as the
  699. gimp_convolve function except that the tools arguments are obtained
  700. from the convolve option dialog. It this dialog has not been
  701. activated then the dialogs default values will be used.</para>
  702. <para>
  703.  
  704. </para><informaltable pgwide=1 frame="none" role="params">
  705. <tgroup cols="2">
  706. <colspec colwidth="2*">
  707. <colspec colwidth="8*">
  708. <tbody>
  709. <row><entry align="right"><parameter>drawable_ID</parameter> :</entry>
  710. <entry> The affected drawable.
  711. </entry></row>
  712. <row><entry align="right"><parameter>num_strokes</parameter> :</entry>
  713. <entry> Number of stroke control points (count each coordinate as 2 points).
  714. </entry></row>
  715. <row><entry align="right"><parameter>strokes</parameter> :</entry>
  716. <entry> Array of stroke coordinates: { s1.x, s1.y, s2.x, s2.y, ..., sn.x, sn.y }.
  717. </entry></row>
  718. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE on success.
  719. </entry></row>
  720. </tbody></tgroup></informaltable></refsect2>
  721. <refsect2>
  722. <title><anchor id="gimp-crop">gimp_crop ()</title>
  723. <programlisting><link linkend="gboolean">gboolean</link>    gimp_crop                       (<link linkend="gint32">gint32</link> image_ID,
  724.                                              <link linkend="gint">gint</link> new_width,
  725.                                              <link linkend="gint">gint</link> new_height,
  726.                                              <link linkend="gint">gint</link> offx,
  727.                                              <link linkend="gint">gint</link> offy);</programlisting>
  728. <para>
  729. Crop the image to the specified extents.
  730. </para>
  731. <para>
  732. This procedure crops the image so that it's new width and height are
  733. equal to the supplied parameters. Offsets are also provided which
  734. describe the position of the previous image's content. All channels
  735. and layers within the image are cropped to the new image extents;
  736. this includes the image selection mask. If any parameters are out of
  737. range, an error is returned.</para>
  738. <para>
  739.  
  740. </para><informaltable pgwide=1 frame="none" role="params">
  741. <tgroup cols="2">
  742. <colspec colwidth="2*">
  743. <colspec colwidth="8*">
  744. <tbody>
  745. <row><entry align="right"><parameter>image_ID</parameter> :</entry>
  746. <entry> The image.
  747. </entry></row>
  748. <row><entry align="right"><parameter>new_width</parameter> :</entry>
  749. <entry> New image width: (0 < new_width <= width).
  750. </entry></row>
  751. <row><entry align="right"><parameter>new_height</parameter> :</entry>
  752. <entry> New image height: (0 < new_height <= height).
  753. </entry></row>
  754. <row><entry align="right"><parameter>offx</parameter> :</entry>
  755. <entry> x offset: (0 <= offx <= (width - new_width)).
  756. </entry></row>
  757. <row><entry align="right"><parameter>offy</parameter> :</entry>
  758. <entry> y offset: (0 <= offy <= (height - new_height)).
  759. </entry></row>
  760. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE on success.
  761. </entry></row>
  762. </tbody></tgroup></informaltable></refsect2>
  763. <refsect2>
  764. <title><anchor id="gimp-dodgeburn">gimp_dodgeburn ()</title>
  765. <programlisting><link linkend="gboolean">gboolean</link>    gimp_dodgeburn                  (<link linkend="gint32">gint32</link> drawable_ID,
  766.                                              <link linkend="gdouble">gdouble</link> exposure,
  767.                                              <link linkend="GimpDodgeBurnType">GimpDodgeBurnType</link> dodgeburn_type,
  768.                                              <link linkend="GimpDodgeBurnMode">GimpDodgeBurnMode</link> dodgeburn_mode,
  769.                                              <link linkend="gint">gint</link> num_strokes,
  770.                                              <link linkend="gdouble">gdouble</link> *strokes);</programlisting>
  771. <para>
  772. Dodgeburn image with varying exposure.
  773. </para>
  774. <para>
  775. Dodgebure. More details here later.</para>
  776. <para>
  777.  
  778. </para><informaltable pgwide=1 frame="none" role="params">
  779. <tgroup cols="2">
  780. <colspec colwidth="2*">
  781. <colspec colwidth="8*">
  782. <tbody>
  783. <row><entry align="right"><parameter>drawable_ID</parameter> :</entry>
  784. <entry> The affected drawable.
  785. </entry></row>
  786. <row><entry align="right"><parameter>exposure</parameter> :</entry>
  787. <entry> The exposer of the strokes.
  788. </entry></row>
  789. <row><entry align="right"><parameter>dodgeburn_type</parameter> :</entry>
  790. <entry> The type either dodge or burn.
  791. </entry></row>
  792. <row><entry align="right"><parameter>dodgeburn_mode</parameter> :</entry>
  793. <entry> The mode.
  794. </entry></row>
  795. <row><entry align="right"><parameter>num_strokes</parameter> :</entry>
  796. <entry> Number of stroke control points (count each coordinate as 2 points).
  797. </entry></row>
  798. <row><entry align="right"><parameter>strokes</parameter> :</entry>
  799. <entry> Array of stroke coordinates: { s1.x, s1.y, s2.x, s2.y, ..., sn.x, sn.y }.
  800. </entry></row>
  801. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE on success.
  802. </entry></row>
  803. </tbody></tgroup></informaltable></refsect2>
  804. <refsect2>
  805. <title><anchor id="gimp-dodgeburn-default">gimp_dodgeburn_default ()</title>
  806. <programlisting><link linkend="gboolean">gboolean</link>    gimp_dodgeburn_default          (<link linkend="gint32">gint32</link> drawable_ID,
  807.                                              <link linkend="gint">gint</link> num_strokes,
  808.                                              <link linkend="gdouble">gdouble</link> *strokes);</programlisting>
  809. <para>
  810. Dodgeburn image with varying exposure. This is the same as the
  811. gimp_dodgeburn function except that the exposure, type and mode are
  812. taken from the tools option dialog. If the dialog has not been
  813. activated then the defaults as used by the dialog will be used.
  814. </para>
  815. <para>
  816. Dodgebure. More details here later.</para>
  817. <para>
  818.  
  819. </para><informaltable pgwide=1 frame="none" role="params">
  820. <tgroup cols="2">
  821. <colspec colwidth="2*">
  822. <colspec colwidth="8*">
  823. <tbody>
  824. <row><entry align="right"><parameter>drawable_ID</parameter> :</entry>
  825. <entry> The affected drawable.
  826. </entry></row>
  827. <row><entry align="right"><parameter>num_strokes</parameter> :</entry>
  828. <entry> Number of stroke control points (count each coordinate as 2 points).
  829. </entry></row>
  830. <row><entry align="right"><parameter>strokes</parameter> :</entry>
  831. <entry> Array of stroke coordinates: { s1.x, s1.y, s2.x, s2.y, ..., sn.x, sn.y }.
  832. </entry></row>
  833. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE on success.
  834. </entry></row>
  835. </tbody></tgroup></informaltable></refsect2>
  836. <refsect2>
  837. <title><anchor id="gimp-ellipse-select">gimp_ellipse_select ()</title>
  838. <programlisting><link linkend="gboolean">gboolean</link>    gimp_ellipse_select             (<link linkend="gint32">gint32</link> image_ID,
  839.                                              <link linkend="gdouble">gdouble</link> x,
  840.                                              <link linkend="gdouble">gdouble</link> y,
  841.                                              <link linkend="gdouble">gdouble</link> width,
  842.                                              <link linkend="gdouble">gdouble</link> height,
  843.                                              <link linkend="GimpChannelOps">GimpChannelOps</link> operation,
  844.                                              <link linkend="gboolean">gboolean</link> antialias,
  845.                                              <link linkend="gboolean">gboolean</link> feather,
  846.                                              <link linkend="gdouble">gdouble</link> feather_radius);</programlisting>
  847. <para>
  848. Create an elliptical selection over the specified image.
  849. </para>
  850. <para>
  851. This tool creates an elliptical selection over the specified image.
  852. The elliptical region can be either added to, subtracted from, or
  853. replace the contents of the previous selection mask. If antialiasing
  854. is turned on, the edges of the elliptical region will contain
  855. intermediate values which give the appearance of a sharper, less
  856. pixelized edge. This should be set as TRUE most of the time. If the
  857. feather option is enabled, the resulting selection is blurred before
  858. combining. The blur is a gaussian blur with the specified feather
  859. radius.</para>
  860. <para>
  861.  
  862. </para><informaltable pgwide=1 frame="none" role="params">
  863. <tgroup cols="2">
  864. <colspec colwidth="2*">
  865. <colspec colwidth="8*">
  866. <tbody>
  867. <row><entry align="right"><parameter>image_ID</parameter> :</entry>
  868. <entry> The image.
  869. </entry></row>
  870. <row><entry align="right"><parameter>x</parameter> :</entry>
  871. <entry> x coordinate of upper-left corner of ellipse bounding box.
  872. </entry></row>
  873. <row><entry align="right"><parameter>y</parameter> :</entry>
  874. <entry> y coordinate of upper-left corner of ellipse bounding box.
  875. </entry></row>
  876. <row><entry align="right"><parameter>width</parameter> :</entry>
  877. <entry> The width of the ellipse.
  878. </entry></row>
  879. <row><entry align="right"><parameter>height</parameter> :</entry>
  880. <entry> The height of the ellipse.
  881. </entry></row>
  882. <row><entry align="right"><parameter>operation</parameter> :</entry>
  883. <entry> The selection operation.
  884. </entry></row>
  885. <row><entry align="right"><parameter>antialias</parameter> :</entry>
  886. <entry> Antialiasing.
  887. </entry></row>
  888. <row><entry align="right"><parameter>feather</parameter> :</entry>
  889. <entry> Feather option for selections.
  890. </entry></row>
  891. <row><entry align="right"><parameter>feather_radius</parameter> :</entry>
  892. <entry> Radius for feather operation.
  893. </entry></row>
  894. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE on success.
  895. </entry></row>
  896. </tbody></tgroup></informaltable></refsect2>
  897. <refsect2>
  898. <title><anchor id="gimp-eraser">gimp_eraser ()</title>
  899. <programlisting><link linkend="gboolean">gboolean</link>    gimp_eraser                     (<link linkend="gint32">gint32</link> drawable_ID,
  900.                                              <link linkend="gint">gint</link> num_strokes,
  901.                                              <link linkend="gdouble">gdouble</link> *strokes,
  902.                                              <link linkend="GimpBrushApplicationMode">GimpBrushApplicationMode</link> hardness,
  903.                                              <link linkend="GimpPaintApplicationMode">GimpPaintApplicationMode</link> method);</programlisting>
  904. <para>
  905. Erase using the current brush.
  906. </para>
  907. <para>
  908. This tool erases using the current brush mask. If the specified
  909. drawable contains an alpha channel, then the erased pixels will
  910. become transparent. Otherwise, the eraser tool replaces the contents
  911. of the drawable with the background color. Like paintbrush, this
  912. tool linearly interpolates between the specified stroke coordinates.</para>
  913. <para>
  914.  
  915. </para><informaltable pgwide=1 frame="none" role="params">
  916. <tgroup cols="2">
  917. <colspec colwidth="2*">
  918. <colspec colwidth="8*">
  919. <tbody>
  920. <row><entry align="right"><parameter>drawable_ID</parameter> :</entry>
  921. <entry> The affected drawable.
  922. </entry></row>
  923. <row><entry align="right"><parameter>num_strokes</parameter> :</entry>
  924. <entry> Number of stroke control points (count each coordinate as 2 points).
  925. </entry></row>
  926. <row><entry align="right"><parameter>strokes</parameter> :</entry>
  927. <entry> Array of stroke coordinates: { s1.x, s1.y, s2.x, s2.y, ..., sn.x, sn.y }.
  928. </entry></row>
  929. <row><entry align="right"><parameter>hardness</parameter> :</entry>
  930. <entry> %<literal>desc</literal>%%.
  931. </entry></row>
  932. <row><entry align="right"><parameter>method</parameter> :</entry>
  933. <entry> %<literal>desc</literal>%%.
  934. </entry></row>
  935. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE on success.
  936. </entry></row>
  937. </tbody></tgroup></informaltable></refsect2>
  938. <refsect2>
  939. <title><anchor id="gimp-eraser-default">gimp_eraser_default ()</title>
  940. <programlisting><link linkend="gboolean">gboolean</link>    gimp_eraser_default             (<link linkend="gint32">gint32</link> drawable_ID,
  941.                                              <link linkend="gint">gint</link> num_strokes,
  942.                                              <link linkend="gdouble">gdouble</link> *strokes);</programlisting>
  943. <para>
  944. Erase using the current brush.
  945. </para>
  946. <para>
  947. This tool erases using the current brush mask. This function
  948. performs exactly the same as the gimp_eraser function except that
  949. the tools arguments are obtained from the eraser option dialog. It
  950. this dialog has not been activated then the dialogs default values
  951. will be used.</para>
  952. <para>
  953.  
  954. </para><informaltable pgwide=1 frame="none" role="params">
  955. <tgroup cols="2">
  956. <colspec colwidth="2*">
  957. <colspec colwidth="8*">
  958. <tbody>
  959. <row><entry align="right"><parameter>drawable_ID</parameter> :</entry>
  960. <entry> The affected drawable.
  961. </entry></row>
  962. <row><entry align="right"><parameter>num_strokes</parameter> :</entry>
  963. <entry> Number of stroke control points (count each coordinate as 2 points).
  964. </entry></row>
  965. <row><entry align="right"><parameter>strokes</parameter> :</entry>
  966. <entry> Array of stroke coordinates: { s1.x, s1.y, s2.x, s2.y, ..., sn.x, sn.y }.
  967. </entry></row>
  968. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE on success.
  969. </entry></row>
  970. </tbody></tgroup></informaltable></refsect2>
  971. <refsect2>
  972. <title><anchor id="gimp-flip">gimp_flip ()</title>
  973. <programlisting><link linkend="gint32">gint32</link>      gimp_flip                       (<link linkend="gint32">gint32</link> drawable_ID,
  974.                                              <link linkend="GimpOrientationType">GimpOrientationType</link> flip_type);</programlisting>
  975. <para>
  976. Flip the specified drawable about its center either vertically or
  977. horizontally.
  978. </para>
  979. <para>
  980. This tool flips the specified drawable if no selection exists. If a
  981. selection exists, the portion of the drawable which lies under the
  982. selection is cut from the drawable and made into a floating
  983. selection which is then flipd by the specified amount. The return
  984. value is the ID of the flipped drawable. If there was no selection,
  985. this will be equal to the drawable ID supplied as input. Otherwise,
  986. this will be the newly created and flipped drawable. The flip type
  987. parameter indicates whether the flip will be applied horizontally or
  988. vertically.</para>
  989. <para>
  990.  
  991. </para><informaltable pgwide=1 frame="none" role="params">
  992. <tgroup cols="2">
  993. <colspec colwidth="2*">
  994. <colspec colwidth="8*">
  995. <tbody>
  996. <row><entry align="right"><parameter>drawable_ID</parameter> :</entry>
  997. <entry> The affected drawable.
  998. </entry></row>
  999. <row><entry align="right"><parameter>flip_type</parameter> :</entry>
  1000. <entry> Type of flip.
  1001. </entry></row>
  1002. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> The flipped drawable.
  1003. </entry></row>
  1004. </tbody></tgroup></informaltable></refsect2>
  1005. <refsect2>
  1006. <title><anchor id="gimp-free-select">gimp_free_select ()</title>
  1007. <programlisting><link linkend="gboolean">gboolean</link>    gimp_free_select                (<link linkend="gint32">gint32</link> image_ID,
  1008.                                              <link linkend="gint">gint</link> num_segs,
  1009.                                              <link linkend="gdouble">gdouble</link> *segs,
  1010.                                              <link linkend="GimpChannelOps">GimpChannelOps</link> operation,
  1011.                                              <link linkend="gboolean">gboolean</link> antialias,
  1012.                                              <link linkend="gboolean">gboolean</link> feather,
  1013.                                              <link linkend="gdouble">gdouble</link> feather_radius);</programlisting>
  1014. <para>
  1015. Create a polygonal selection over the specified image.
  1016. </para>
  1017. <para>
  1018. This tool creates a polygonal selection over the specified image.
  1019. The polygonal region can be either added to, subtracted from, or
  1020. replace the contents of the previous selection mask. The polygon is
  1021. specified through an array of floating point numbers and its length.
  1022. The length of array must be 2n, where n is the number of points.
  1023. Each point is defined by 2 floating point values which correspond to
  1024. the x and y coordinates. If the final point does not connect to the
  1025. starting point, a connecting segment is automatically added. If the
  1026. feather option is enabled, the resulting selection is blurred before
  1027. combining. The blur is a gaussian blur with the specified feather
  1028. radius.</para>
  1029. <para>
  1030.  
  1031. </para><informaltable pgwide=1 frame="none" role="params">
  1032. <tgroup cols="2">
  1033. <colspec colwidth="2*">
  1034. <colspec colwidth="8*">
  1035. <tbody>
  1036. <row><entry align="right"><parameter>image_ID</parameter> :</entry>
  1037. <entry> The image.
  1038. </entry></row>
  1039. <row><entry align="right"><parameter>num_segs</parameter> :</entry>
  1040. <entry> Number of points (count 1 coordinate as two points).
  1041. </entry></row>
  1042. <row><entry align="right"><parameter>segs</parameter> :</entry>
  1043. <entry> Array of points: { p1.x, p1.y, p2.x, p2.y, ..., pn.x, pn.y}.
  1044. </entry></row>
  1045. <row><entry align="right"><parameter>operation</parameter> :</entry>
  1046. <entry> The selection operation.
  1047. </entry></row>
  1048. <row><entry align="right"><parameter>antialias</parameter> :</entry>
  1049. <entry> Antialiasing.
  1050. </entry></row>
  1051. <row><entry align="right"><parameter>feather</parameter> :</entry>
  1052. <entry> Feather option for selections.
  1053. </entry></row>
  1054. <row><entry align="right"><parameter>feather_radius</parameter> :</entry>
  1055. <entry> Radius for feather operation.
  1056. </entry></row>
  1057. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE on success.
  1058. </entry></row>
  1059. </tbody></tgroup></informaltable></refsect2>
  1060. <refsect2>
  1061. <title><anchor id="gimp-fuzzy-select">gimp_fuzzy_select ()</title>
  1062. <programlisting><link linkend="gboolean">gboolean</link>    gimp_fuzzy_select               (<link linkend="gint32">gint32</link> drawable_ID,
  1063.                                              <link linkend="gdouble">gdouble</link> x,
  1064.                                              <link linkend="gdouble">gdouble</link> y,
  1065.                                              <link linkend="gint">gint</link> threshold,
  1066.                                              <link linkend="GimpChannelOps">GimpChannelOps</link> operation,
  1067.                                              <link linkend="gboolean">gboolean</link> antialias,
  1068.                                              <link linkend="gboolean">gboolean</link> feather,
  1069.                                              <link linkend="gdouble">gdouble</link> feather_radius,
  1070.                                              <link linkend="gboolean">gboolean</link> sample_merged);</programlisting>
  1071. <para>
  1072. Create a fuzzy selection starting at the specified coordinates on
  1073. the specified drawable.
  1074. </para>
  1075. <para>
  1076. This tool creates a fuzzy selection over the specified image. A
  1077. fuzzy selection is determined by a seed fill under the constraints
  1078. of the specified threshold. Essentially, the color at the specified
  1079. coordinates (in the drawable) is measured and the selection expands
  1080. outwards from that point to any adjacent pixels which are not
  1081. significantly different (as determined by the threshold value). This
  1082. process continues until no more expansion is possible. The
  1083. antialiasing parameter allows the final selection mask to contain
  1084. intermediate values based on close misses to the threshold bar at
  1085. pixels along the seed fill boundary. Feathering can be enabled
  1086. optionally and is controlled with the \"feather_radius\" paramter.
  1087. If the sample_merged parameter is non-zero, the data of the
  1088. composite image will be used instead of that for the specified
  1089. drawable. This is equivalent to sampling for colors after merging
  1090. all visible layers. In the case of a merged sampling, the supplied
  1091. drawable is ignored. If the sample is merged, the specified
  1092. coordinates are relative to the image origin; otherwise, they are
  1093. relative to the drawable's origin.</para>
  1094. <para>
  1095.  
  1096. </para><informaltable pgwide=1 frame="none" role="params">
  1097. <tgroup cols="2">
  1098. <colspec colwidth="2*">
  1099. <colspec colwidth="8*">
  1100. <tbody>
  1101. <row><entry align="right"><parameter>drawable_ID</parameter> :</entry>
  1102. <entry> The affected drawable.
  1103. </entry></row>
  1104. <row><entry align="right"><parameter>x</parameter> :</entry>
  1105. <entry> x coordinate of initial seed fill point: (image coordinates).
  1106. </entry></row>
  1107. <row><entry align="right"><parameter>y</parameter> :</entry>
  1108. <entry> y coordinate of initial seed fill point: (image coordinates).
  1109. </entry></row>
  1110. <row><entry align="right"><parameter>threshold</parameter> :</entry>
  1111. <entry> Threshold in intensity levels %<literal>desc</literal>%%.
  1112. </entry></row>
  1113. <row><entry align="right"><parameter>operation</parameter> :</entry>
  1114. <entry> The selection operation.
  1115. </entry></row>
  1116. <row><entry align="right"><parameter>antialias</parameter> :</entry>
  1117. <entry> Antialiasing.
  1118. </entry></row>
  1119. <row><entry align="right"><parameter>feather</parameter> :</entry>
  1120. <entry> Feather option for selections.
  1121. </entry></row>
  1122. <row><entry align="right"><parameter>feather_radius</parameter> :</entry>
  1123. <entry> Radius for feather operation.
  1124. </entry></row>
  1125. <row><entry align="right"><parameter>sample_merged</parameter> :</entry>
  1126. <entry> Use the composite image, not the drawable.
  1127. </entry></row>
  1128. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE on success.
  1129. </entry></row>
  1130. </tbody></tgroup></informaltable></refsect2>
  1131. <refsect2>
  1132. <title><anchor id="gimp-paintbrush">gimp_paintbrush ()</title>
  1133. <programlisting><link linkend="gboolean">gboolean</link>    gimp_paintbrush                 (<link linkend="gint32">gint32</link> drawable_ID,
  1134.                                              <link linkend="gdouble">gdouble</link> fade_out,
  1135.                                              <link linkend="gint">gint</link> num_strokes,
  1136.                                              <link linkend="gdouble">gdouble</link> *strokes,
  1137.                                              <link linkend="GimpPaintApplicationMode">GimpPaintApplicationMode</link> method,
  1138.                                              <link linkend="gdouble">gdouble</link> gradient_length);</programlisting>
  1139. <para>
  1140. Paint in the current brush with optional fade out parameter and pull
  1141. colors from a gradient.
  1142. </para>
  1143. <para>
  1144. This tool is the standard paintbrush. It draws linearly interpolated
  1145. lines through the specified stroke coordinates. It operates on the
  1146. specified drawable in the foreground color with the active brush.
  1147. The \"fade_out\" parameter is measured in pixels and allows the
  1148. brush stroke to linearly fall off. The pressure is set to the
  1149. maximum at the beginning of the stroke. As the distance of the
  1150. stroke nears the fade_out value, the pressure will approach zero.
  1151. The gradient_length is the distance to spread the gradient over. It
  1152. is measured in pixels. If the gradient_length is 0, no gradient is
  1153. used.</para>
  1154. <para>
  1155.  
  1156. </para><informaltable pgwide=1 frame="none" role="params">
  1157. <tgroup cols="2">
  1158. <colspec colwidth="2*">
  1159. <colspec colwidth="8*">
  1160. <tbody>
  1161. <row><entry align="right"><parameter>drawable_ID</parameter> :</entry>
  1162. <entry> The affected drawable.
  1163. </entry></row>
  1164. <row><entry align="right"><parameter>fade_out</parameter> :</entry>
  1165. <entry> Fade out parameter.
  1166. </entry></row>
  1167. <row><entry align="right"><parameter>num_strokes</parameter> :</entry>
  1168. <entry> Number of stroke control points (count each coordinate as 2 points).
  1169. </entry></row>
  1170. <row><entry align="right"><parameter>strokes</parameter> :</entry>
  1171. <entry> Array of stroke coordinates: { s1.x, s1.y, s2.x, s2.y, ..., sn.x, sn.y }.
  1172. </entry></row>
  1173. <row><entry align="right"><parameter>method</parameter> :</entry>
  1174. <entry> %<literal>desc</literal>%%.
  1175. </entry></row>
  1176. <row><entry align="right"><parameter>gradient_length</parameter> :</entry>
  1177. <entry> Length of gradient to draw.
  1178. </entry></row>
  1179. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE on success.
  1180. </entry></row>
  1181. </tbody></tgroup></informaltable></refsect2>
  1182. <refsect2>
  1183. <title><anchor id="gimp-paintbrush-default">gimp_paintbrush_default ()</title>
  1184. <programlisting><link linkend="gboolean">gboolean</link>    gimp_paintbrush_default         (<link linkend="gint32">gint32</link> drawable_ID,
  1185.                                              <link linkend="gint">gint</link> num_strokes,
  1186.                                              <link linkend="gdouble">gdouble</link> *strokes);</programlisting>
  1187. <para>
  1188. Paint in the current brush. The fade out parameter and pull colors
  1189. from a gradient parameter are set from the paintbrush options
  1190. dialog. If this dialog has not been activated then the dialog
  1191. defaults will be used.
  1192. </para>
  1193. <para>
  1194. This tool is similar to the standard paintbrush. It draws linearly
  1195. interpolated lines through the specified stroke coordinates. It
  1196. operates on the specified drawable in the foreground color with the
  1197. active brush. The \"fade_out\" parameter is measured in pixels and
  1198. allows the brush stroke to linearly fall off (value obtained from
  1199. the option dialog). The pressure is set to the maximum at the
  1200. beginning of the stroke. As the distance of the stroke nears the
  1201. fade_out value, the pressure will approach zero. The gradient_length
  1202. (value obtained from the option dialog) is the distance to spread
  1203. the gradient over. It is measured in pixels. If the gradient_length
  1204. is 0, no gradient is used.</para>
  1205. <para>
  1206.  
  1207. </para><informaltable pgwide=1 frame="none" role="params">
  1208. <tgroup cols="2">
  1209. <colspec colwidth="2*">
  1210. <colspec colwidth="8*">
  1211. <tbody>
  1212. <row><entry align="right"><parameter>drawable_ID</parameter> :</entry>
  1213. <entry> The affected drawable.
  1214. </entry></row>
  1215. <row><entry align="right"><parameter>num_strokes</parameter> :</entry>
  1216. <entry> Number of stroke control points (count each coordinate as 2 points).
  1217. </entry></row>
  1218. <row><entry align="right"><parameter>strokes</parameter> :</entry>
  1219. <entry> Array of stroke coordinates: { s1.x, s1.y, s2.x, s2.y, ..., sn.x, sn.y }.
  1220. </entry></row>
  1221. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE on success.
  1222. </entry></row>
  1223. </tbody></tgroup></informaltable></refsect2>
  1224. <refsect2>
  1225. <title><anchor id="gimp-pencil">gimp_pencil ()</title>
  1226. <programlisting><link linkend="gboolean">gboolean</link>    gimp_pencil                     (<link linkend="gint32">gint32</link> drawable_ID,
  1227.                                              <link linkend="gint">gint</link> num_strokes,
  1228.                                              <link linkend="gdouble">gdouble</link> *strokes);</programlisting>
  1229. <para>
  1230. Paint in the current brush without sub-pixel sampling.
  1231. </para>
  1232. <para>
  1233. This tool is the standard pencil. It draws linearly interpolated
  1234. lines through the specified stroke coordinates. It operates on the
  1235. specified drawable in the foreground color with the active brush.
  1236. The brush mask is treated as though it contains only black and white
  1237. values. Any value below half is treated as black; any above half, as
  1238. white.</para>
  1239. <para>
  1240.  
  1241. </para><informaltable pgwide=1 frame="none" role="params">
  1242. <tgroup cols="2">
  1243. <colspec colwidth="2*">
  1244. <colspec colwidth="8*">
  1245. <tbody>
  1246. <row><entry align="right"><parameter>drawable_ID</parameter> :</entry>
  1247. <entry> The affected drawable.
  1248. </entry></row>
  1249. <row><entry align="right"><parameter>num_strokes</parameter> :</entry>
  1250. <entry> Number of stroke control points (count each coordinate as 2 points).
  1251. </entry></row>
  1252. <row><entry align="right"><parameter>strokes</parameter> :</entry>
  1253. <entry> Array of stroke coordinates: { s1.x, s1.y, s2.x, s2.y, ..., sn.x, sn.y }.
  1254. </entry></row>
  1255. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE on success.
  1256. </entry></row>
  1257. </tbody></tgroup></informaltable></refsect2>
  1258. <refsect2>
  1259. <title><anchor id="gimp-perspective">gimp_perspective ()</title>
  1260. <programlisting><link linkend="gint32">gint32</link>      gimp_perspective                (<link linkend="gint32">gint32</link> drawable_ID,
  1261.                                              <link linkend="gboolean">gboolean</link> interpolation,
  1262.                                              <link linkend="gdouble">gdouble</link> x0,
  1263.                                              <link linkend="gdouble">gdouble</link> y0,
  1264.                                              <link linkend="gdouble">gdouble</link> x1,
  1265.                                              <link linkend="gdouble">gdouble</link> y1,
  1266.                                              <link linkend="gdouble">gdouble</link> x2,
  1267.                                              <link linkend="gdouble">gdouble</link> y2,
  1268.                                              <link linkend="gdouble">gdouble</link> x3,
  1269.                                              <link linkend="gdouble">gdouble</link> y3);</programlisting>
  1270. <para>
  1271. Perform a possibly non-affine transformation on the specified
  1272. drawable.
  1273. </para>
  1274. <para>
  1275. This tool performs a possibly non-affine transformation on the
  1276. specified drawable by allowing the corners of the original bounding
  1277. box to be arbitrarily remapped to any values. The specified drawable
  1278. is remapped if no selection exists. However, if a selection exists,
  1279. the portion of the drawable which lies under the selection is cut
  1280. from the drawable and made into a floating selection which is then
  1281. remapped as specified. The interpolation parameter can be set to
  1282. TRUE to indicate that either linear or cubic interpolation should be
  1283. used to smooth the resulting remapped drawable. The return value is
  1284. the ID of the remapped drawable. If there was no selection, this
  1285. will be equal to the drawable ID supplied as input. Otherwise, this
  1286. will be the newly created and remapped drawable. The 4 coordinates
  1287. specify the new locations of each corner of the original bounding
  1288. box. By specifying these values, any affine transformation
  1289. (rotation, scaling, translation) can be affected. Additionally,
  1290. these values can be specified such that the resulting transformed
  1291. drawable will appear to have been projected via a perspective
  1292. transform.</para>
  1293. <para>
  1294.  
  1295. </para><informaltable pgwide=1 frame="none" role="params">
  1296. <tgroup cols="2">
  1297. <colspec colwidth="2*">
  1298. <colspec colwidth="8*">
  1299. <tbody>
  1300. <row><entry align="right"><parameter>drawable_ID</parameter> :</entry>
  1301. <entry> The affected drawable.
  1302. </entry></row>
  1303. <row><entry align="right"><parameter>interpolation</parameter> :</entry>
  1304. <entry> Whether to use interpolation.
  1305. </entry></row>
  1306. <row><entry align="right"><parameter>x0</parameter> :</entry>
  1307. <entry> The new x coordinate of upper-left corner of original bounding box.
  1308. </entry></row>
  1309. <row><entry align="right"><parameter>y0</parameter> :</entry>
  1310. <entry> The new y coordinate of upper-left corner of original bounding box.
  1311. </entry></row>
  1312. <row><entry align="right"><parameter>x1</parameter> :</entry>
  1313. <entry> The new x coordinate of upper-right corner of original bounding box.
  1314. </entry></row>
  1315. <row><entry align="right"><parameter>y1</parameter> :</entry>
  1316. <entry> The new y coordinate of upper-right corner of original bounding box.
  1317. </entry></row>
  1318. <row><entry align="right"><parameter>x2</parameter> :</entry>
  1319. <entry> The new x coordinate of lower-left corner of original bounding box.
  1320. </entry></row>
  1321. <row><entry align="right"><parameter>y2</parameter> :</entry>
  1322. <entry> The new y coordinate of lower-left corner of original bounding box.
  1323. </entry></row>
  1324. <row><entry align="right"><parameter>x3</parameter> :</entry>
  1325. <entry> The new x coordinate of lower-right corner of original bounding box.
  1326. </entry></row>
  1327. <row><entry align="right"><parameter>y3</parameter> :</entry>
  1328. <entry> The new y coordinate of lower-right corner of original bounding box.
  1329. </entry></row>
  1330. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> The newly mapped drawable.
  1331. </entry></row>
  1332. </tbody></tgroup></informaltable></refsect2>
  1333. <refsect2>
  1334. <title><anchor id="gimp-rect-select">gimp_rect_select ()</title>
  1335. <programlisting><link linkend="gboolean">gboolean</link>    gimp_rect_select                (<link linkend="gint32">gint32</link> image_ID,
  1336.                                              <link linkend="gdouble">gdouble</link> x,
  1337.                                              <link linkend="gdouble">gdouble</link> y,
  1338.                                              <link linkend="gdouble">gdouble</link> width,
  1339.                                              <link linkend="gdouble">gdouble</link> height,
  1340.                                              <link linkend="GimpChannelOps">GimpChannelOps</link> operation,
  1341.                                              <link linkend="gboolean">gboolean</link> feather,
  1342.                                              <link linkend="gdouble">gdouble</link> feather_radius);</programlisting>
  1343. <para>
  1344. Create a rectangular selection over the specified image;
  1345. </para>
  1346. <para>
  1347. This tool creates a rectangular selection over the specified image.
  1348. The rectangular region can be either added to, subtracted from, or
  1349. replace the contents of the previous selection mask. If the feather
  1350. option is enabled, the resulting selection is blurred before
  1351. combining. The blur is a gaussian blur with the specified feather
  1352. radius.</para>
  1353. <para>
  1354.  
  1355. </para><informaltable pgwide=1 frame="none" role="params">
  1356. <tgroup cols="2">
  1357. <colspec colwidth="2*">
  1358. <colspec colwidth="8*">
  1359. <tbody>
  1360. <row><entry align="right"><parameter>image_ID</parameter> :</entry>
  1361. <entry> The image.
  1362. </entry></row>
  1363. <row><entry align="right"><parameter>x</parameter> :</entry>
  1364. <entry> x coordinate of upper-left corner of rectangle.
  1365. </entry></row>
  1366. <row><entry align="right"><parameter>y</parameter> :</entry>
  1367. <entry> y coordinate of upper-left corner of rectangle.
  1368. </entry></row>
  1369. <row><entry align="right"><parameter>width</parameter> :</entry>
  1370. <entry> The width of the rectangle.
  1371. </entry></row>
  1372. <row><entry align="right"><parameter>height</parameter> :</entry>
  1373. <entry> The height of the rectangle.
  1374. </entry></row>
  1375. <row><entry align="right"><parameter>operation</parameter> :</entry>
  1376. <entry> The selection operation.
  1377. </entry></row>
  1378. <row><entry align="right"><parameter>feather</parameter> :</entry>
  1379. <entry> Feather option for selections.
  1380. </entry></row>
  1381. <row><entry align="right"><parameter>feather_radius</parameter> :</entry>
  1382. <entry> Radius for feather operation.
  1383. </entry></row>
  1384. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE on success.
  1385. </entry></row>
  1386. </tbody></tgroup></informaltable></refsect2>
  1387. <refsect2>
  1388. <title><anchor id="gimp-rotate">gimp_rotate ()</title>
  1389. <programlisting><link linkend="gint32">gint32</link>      gimp_rotate                     (<link linkend="gint32">gint32</link> drawable_ID,
  1390.                                              <link linkend="gboolean">gboolean</link> interpolation,
  1391.                                              <link linkend="gdouble">gdouble</link> angle);</programlisting>
  1392. <para>
  1393. Rotate the specified drawable about its center through the specified
  1394. angle.
  1395. </para>
  1396. <para>
  1397. This tool rotates the specified drawable if no selection exists. If
  1398. a selection exists, the portion of the drawable which lies under the
  1399. selection is cut from the drawable and made into a floating
  1400. selection which is then rotated by the specified amount. The
  1401. interpolation parameter can be set to TRUE to indicate that either
  1402. linear or cubic interpolation should be used to smooth the resulting
  1403. rotated drawable. The return value is the ID of the rotated
  1404. drawable. If there was no selection, this will be equal to the
  1405. drawable ID supplied as input. Otherwise, this will be the newly
  1406. created and rotated drawable.</para>
  1407. <para>
  1408.  
  1409. </para><informaltable pgwide=1 frame="none" role="params">
  1410. <tgroup cols="2">
  1411. <colspec colwidth="2*">
  1412. <colspec colwidth="8*">
  1413. <tbody>
  1414. <row><entry align="right"><parameter>drawable_ID</parameter> :</entry>
  1415. <entry> The affected drawable.
  1416. </entry></row>
  1417. <row><entry align="right"><parameter>interpolation</parameter> :</entry>
  1418. <entry> Whether to use interpolation.
  1419. </entry></row>
  1420. <row><entry align="right"><parameter>angle</parameter> :</entry>
  1421. <entry> The angle of rotation (radians).
  1422. </entry></row>
  1423. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> The rotated drawable.
  1424. </entry></row>
  1425. </tbody></tgroup></informaltable></refsect2>
  1426. <refsect2>
  1427. <title><anchor id="gimp-scale">gimp_scale ()</title>
  1428. <programlisting><link linkend="gint32">gint32</link>      gimp_scale                      (<link linkend="gint32">gint32</link> drawable_ID,
  1429.                                              <link linkend="gboolean">gboolean</link> interpolation,
  1430.                                              <link linkend="gdouble">gdouble</link> x0,
  1431.                                              <link linkend="gdouble">gdouble</link> y0,
  1432.                                              <link linkend="gdouble">gdouble</link> x1,
  1433.                                              <link linkend="gdouble">gdouble</link> y1);</programlisting>
  1434. <para>
  1435. Scale the specified drawable.
  1436. </para>
  1437. <para>
  1438. This tool scales the specified drawable if no selection exists. If a
  1439. selection exists, the portion of the drawable which lies under the
  1440. selection is cut from the drawable and made into a floating
  1441. selection which is then scaled by the specified amount. The
  1442. interpolation parameter can be set to TRUE to indicate that either
  1443. linear or cubic interpolation should be used to smooth the resulting
  1444. scaled drawable. The return value is the ID of the scaled drawable.
  1445. If there was no selection, this will be equal to the drawable ID
  1446. supplied as input. Otherwise, this will be the newly created and
  1447. scaled drawable.</para>
  1448. <para>
  1449.  
  1450. </para><informaltable pgwide=1 frame="none" role="params">
  1451. <tgroup cols="2">
  1452. <colspec colwidth="2*">
  1453. <colspec colwidth="8*">
  1454. <tbody>
  1455. <row><entry align="right"><parameter>drawable_ID</parameter> :</entry>
  1456. <entry> The affected drawable.
  1457. </entry></row>
  1458. <row><entry align="right"><parameter>interpolation</parameter> :</entry>
  1459. <entry> Whether to use interpolation.
  1460. </entry></row>
  1461. <row><entry align="right"><parameter>x0</parameter> :</entry>
  1462. <entry> The new x coordinate of upper-left corner of newly scaled region.
  1463. </entry></row>
  1464. <row><entry align="right"><parameter>y0</parameter> :</entry>
  1465. <entry> The new y coordinate of upper-left corner of newly scaled region.
  1466. </entry></row>
  1467. <row><entry align="right"><parameter>x1</parameter> :</entry>
  1468. <entry> The new x coordinate of lower-right corner of newly scaled region.
  1469. </entry></row>
  1470. <row><entry align="right"><parameter>y1</parameter> :</entry>
  1471. <entry> The new y coordinate of lower-right corner of newly scaled region.
  1472. </entry></row>
  1473. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> The scaled drawable.
  1474. </entry></row>
  1475. </tbody></tgroup></informaltable></refsect2>
  1476. <refsect2>
  1477. <title><anchor id="gimp-shear">gimp_shear ()</title>
  1478. <programlisting><link linkend="gint32">gint32</link>      gimp_shear                      (<link linkend="gint32">gint32</link> drawable_ID,
  1479.                                              <link linkend="gboolean">gboolean</link> interpolation,
  1480.                                              <link linkend="GimpOrientationType">GimpOrientationType</link> shear_type,
  1481.                                              <link linkend="gdouble">gdouble</link> magnitude);</programlisting>
  1482. <para>
  1483. Shear the specified drawable about its center by the specified
  1484. magnitude.
  1485. </para>
  1486. <para>
  1487. This tool shears the specified drawable if no selection exists. If a
  1488. selection exists, the portion of the drawable which lies under the
  1489. selection is cut from the drawable and made into a floating
  1490. selection which is then sheard by the specified amount. The
  1491. interpolation parameter can be set to TRUE to indicate that either
  1492. linear or cubic interpolation should be used to smooth the resulting
  1493. sheared drawable. The return value is the ID of the sheard drawable.
  1494. If there was no selection, this will be equal to the drawable ID
  1495. supplied as input. Otherwise, this will be the newly created and
  1496. sheard drawable. The shear type parameter indicates whether the
  1497. shear will be applied horizontally or vertically. The magnitude can
  1498. be either positive or negative and indicates the extent (in pixels)
  1499. to shear by.</para>
  1500. <para>
  1501.  
  1502. </para><informaltable pgwide=1 frame="none" role="params">
  1503. <tgroup cols="2">
  1504. <colspec colwidth="2*">
  1505. <colspec colwidth="8*">
  1506. <tbody>
  1507. <row><entry align="right"><parameter>drawable_ID</parameter> :</entry>
  1508. <entry> The affected drawable.
  1509. </entry></row>
  1510. <row><entry align="right"><parameter>interpolation</parameter> :</entry>
  1511. <entry> Whether to use interpolation.
  1512. </entry></row>
  1513. <row><entry align="right"><parameter>shear_type</parameter> :</entry>
  1514. <entry> Type of shear.
  1515. </entry></row>
  1516. <row><entry align="right"><parameter>magnitude</parameter> :</entry>
  1517. <entry> The magnitude of the shear.
  1518. </entry></row>
  1519. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> The sheared drawable.
  1520. </entry></row>
  1521. </tbody></tgroup></informaltable></refsect2>
  1522. <refsect2>
  1523. <title><anchor id="gimp-smudge">gimp_smudge ()</title>
  1524. <programlisting><link linkend="gboolean">gboolean</link>    gimp_smudge                     (<link linkend="gint32">gint32</link> drawable_ID,
  1525.                                              <link linkend="gdouble">gdouble</link> pressure,
  1526.                                              <link linkend="gint">gint</link> num_strokes,
  1527.                                              <link linkend="gdouble">gdouble</link> *strokes);</programlisting>
  1528. <para>
  1529. Smudge image with varying pressure.
  1530. </para>
  1531. <para>
  1532. This tool simulates a smudge using the current brush. High pressure
  1533. results in a greater smudge of paint while low pressure results in a
  1534. lesser smudge.</para>
  1535. <para>
  1536.  
  1537. </para><informaltable pgwide=1 frame="none" role="params">
  1538. <tgroup cols="2">
  1539. <colspec colwidth="2*">
  1540. <colspec colwidth="8*">
  1541. <tbody>
  1542. <row><entry align="right"><parameter>drawable_ID</parameter> :</entry>
  1543. <entry> The affected drawable.
  1544. </entry></row>
  1545. <row><entry align="right"><parameter>pressure</parameter> :</entry>
  1546. <entry> The pressure of the smudge strokes.
  1547. </entry></row>
  1548. <row><entry align="right"><parameter>num_strokes</parameter> :</entry>
  1549. <entry> Number of stroke control points (count each coordinate as 2 points).
  1550. </entry></row>
  1551. <row><entry align="right"><parameter>strokes</parameter> :</entry>
  1552. <entry> Array of stroke coordinates: { s1.x, s1.y, s2.x, s2.y, ..., sn.x, sn.y }.
  1553. </entry></row>
  1554. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE on success.
  1555. </entry></row>
  1556. </tbody></tgroup></informaltable></refsect2>
  1557. <refsect2>
  1558. <title><anchor id="gimp-smudge-default">gimp_smudge_default ()</title>
  1559. <programlisting><link linkend="gboolean">gboolean</link>    gimp_smudge_default             (<link linkend="gint32">gint32</link> drawable_ID,
  1560.                                              <link linkend="gint">gint</link> num_strokes,
  1561.                                              <link linkend="gdouble">gdouble</link> *strokes);</programlisting>
  1562. <para>
  1563. Smudge image with varying pressure.
  1564. </para>
  1565. <para>
  1566. This tool simulates a smudge using the current brush. It behaves
  1567. exactly the same as gimp_smudge except that the pressure value is
  1568. taken from the smudge tool options or the options default if the
  1569. tools option dialog has not been activated.</para>
  1570. <para>
  1571.  
  1572. </para><informaltable pgwide=1 frame="none" role="params">
  1573. <tgroup cols="2">
  1574. <colspec colwidth="2*">
  1575. <colspec colwidth="8*">
  1576. <tbody>
  1577. <row><entry align="right"><parameter>drawable_ID</parameter> :</entry>
  1578. <entry> The affected drawable.
  1579. </entry></row>
  1580. <row><entry align="right"><parameter>num_strokes</parameter> :</entry>
  1581. <entry> Number of stroke control points (count each coordinate as 2 points).
  1582. </entry></row>
  1583. <row><entry align="right"><parameter>strokes</parameter> :</entry>
  1584. <entry> Array of stroke coordinates: { s1.x, s1.y, s2.x, s2.y, ..., sn.x, sn.y }.
  1585. </entry></row>
  1586. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE on success.
  1587. </entry></row>
  1588. </tbody></tgroup></informaltable></refsect2>
  1589. <refsect2>
  1590. <title><anchor id="gimp-transform-2d">gimp_transform_2d ()</title>
  1591. <programlisting><link linkend="gint32">gint32</link>      gimp_transform_2d               (<link linkend="gint32">gint32</link> drawable_ID,
  1592.                                              <link linkend="gboolean">gboolean</link> interpolation,
  1593.                                              <link linkend="gdouble">gdouble</link> source_x,
  1594.                                              <link linkend="gdouble">gdouble</link> source_y,
  1595.                                              <link linkend="gdouble">gdouble</link> scale_x,
  1596.                                              <link linkend="gdouble">gdouble</link> scale_y,
  1597.                                              <link linkend="gdouble">gdouble</link> angle,
  1598.                                              <link linkend="gdouble">gdouble</link> dest_x,
  1599.                                              <link linkend="gdouble">gdouble</link> dest_y);</programlisting>
  1600. <para>
  1601. Transform the specified drawable in 2d.
  1602. </para>
  1603. <para>
  1604. This tool transforms the specified drawable if no selection exists.
  1605. If a selection exists, the portion of the drawable which lies under
  1606. the selection is cut from the drawable and made into a floating
  1607. selection which is then transformed. The interpolation parameter can
  1608. be set to TRUE to indicate that either linear or cubic interpolation
  1609. should be used to smooth the resulting drawable. The transformation
  1610. is done by scaling the image by the x and y scale factors about the
  1611. point (source_x, source_y), then rotating around the same point,
  1612. then translating that point to the new position (dest_x, dest_y).
  1613. The return value is the ID of the rotated drawable. If there was no
  1614. selection, this will be equal to the drawable ID supplied as input.
  1615. Otherwise, this will be the newly created and transformed drawable.</para>
  1616. <para>
  1617.  
  1618. </para><informaltable pgwide=1 frame="none" role="params">
  1619. <tgroup cols="2">
  1620. <colspec colwidth="2*">
  1621. <colspec colwidth="8*">
  1622. <tbody>
  1623. <row><entry align="right"><parameter>drawable_ID</parameter> :</entry>
  1624. <entry> The affected drawable.
  1625. </entry></row>
  1626. <row><entry align="right"><parameter>interpolation</parameter> :</entry>
  1627. <entry> Whether to use interpolation.
  1628. </entry></row>
  1629. <row><entry align="right"><parameter>source_x</parameter> :</entry>
  1630. <entry> X coordinate of the transformation center.
  1631. </entry></row>
  1632. <row><entry align="right"><parameter>source_y</parameter> :</entry>
  1633. <entry> Y coordinate of the transformation center.
  1634. </entry></row>
  1635. <row><entry align="right"><parameter>scale_x</parameter> :</entry>
  1636. <entry> Amount to scale in x direction.
  1637. </entry></row>
  1638. <row><entry align="right"><parameter>scale_y</parameter> :</entry>
  1639. <entry> Amount to scale in y direction.
  1640. </entry></row>
  1641. <row><entry align="right"><parameter>angle</parameter> :</entry>
  1642. <entry> The angle of rotation (radians).
  1643. </entry></row>
  1644. <row><entry align="right"><parameter>dest_x</parameter> :</entry>
  1645. <entry> X coordinate of where the centre goes.
  1646. </entry></row>
  1647. <row><entry align="right"><parameter>dest_y</parameter> :</entry>
  1648. <entry> Y coordinate of where the centre goes.
  1649. </entry></row>
  1650. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> The transformed drawable.
  1651. </entry></row>
  1652. </tbody></tgroup></informaltable></refsect2>
  1653.  
  1654. </refsect1>
  1655.  
  1656.  
  1657.  
  1658.  
  1659. </refentry>
  1660.